

from django.contrib import admin
from models import Poll,Choice

class ChoiceInline(admin.TabularInline):
#class ChoiceInline(admin.StackedInline):
    model = Choice
    extra = 3

class PollAdmin(admin.ModelAdmin):
    fieldsets = [
        (None, {'fields':['question']}),
        ('Date information',{'fields':['pub_date']})
    ]
    #inlines = [ChoiceInline],
    list_display = ('question','pub_date','was_published_recently')
    list_filter = ['pub_date']

admin.site.register(Poll,PollAdmin)
admin.site.register(Choice)